import request from '@/utils/request'

const service = window.CONFIG.services.admin

//新建群发  手动版
export function addDispatch(data) {
  return request({
    url: service+'/wecom/message/push/add',
    method: 'post',
    data,
  })
}

export function coeAddDispatch(data) {
  return request({
    url: service+'/wecom/message/coe/add',
    method: 'post',
    data,
  })
}

//查询群发列表 -- 手动版
export function getDispathList(params) {
  return request({
    url: service+'/wecom/message/push/list',
    method: 'get',
    params,
  })
}

// 查询群发列表 -- 自动版
export function getWecomMessageCoeList(params) {
  return request({
    url: service+'/wecom/message/coe/list',
    method: 'get',
    params,
  })
}


//手动新增推送
export function send(params) {
  return request({
    url: service+'/wecom/message/push/add',
    method: 'get',
    params,
  })
}

//推送
export function pushCustomer(data) {
  return request({
    url: service+'/wecom/message/push/customer',
    method: 'post',
    data,
  })
}

//推送
export function coePush(params) {
  return request({
    url: service+'/wecom/message/coe/push',
    method: 'get',
    params,
  })
}

//提醒发送
export function pushRemind(data) {
  return request({
    url: service+'/wecom/message/push/remind',
    method: 'post',
    data,
  })
}

//获取详情
export function pushInfo(data) {
  return request({
    url: service+'/wecom/message/push/info',
    method: 'post',
    data,
  })
}

//获取员工详情
export function userInfo(params) {
  return request({
    url: service+'/wecom/message/push/userInfo',
    method: 'get',
    params,
  })
}

//获取客户详情
export function customerInfo(params) {
  return request({
    url: service+'/wecom/message/push/customerInfo',
    method: 'get',
    params,
  })
}

// 查询目标客户标签
export function groupLabel() {
  return request({
    url: '/admin/label/searchAll',
    method: 'get',
  })
}

// 查询目标客户标签 -- 根据超级企微查询
export function groupLabelNew(params) {
  return request({
    url: '/admin/label/searchUserLabel',
    method: 'get',
    params
  })
}

// 审核 --自动版
export function coeExamine(params) {
  return request({
    url: '/admin/wecom/message/coe/examine',
    method: 'get',
    params
  })
}

// 推送进度
export function queryProgressList(params) {
  return request({
    url: '/admin/admin/progress/list',
    method: 'get',
    params
  })
}

export function coeCancel(params) {
  return request({
    url: '/admin/wecom/message/coe/cancel',
    method: 'get',
    params
  })
}
